package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_link_group;

//DAO
public interface U_link_groupMapperBase {

	// 根据id查看
	@Select("SELECT * FROM u_link_group  WHERE id = #{id}")
	public ApiU_link_group findU_link_groupById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_link_group order by sort asc")
	public List<ApiU_link_group> findU_link_groups();

	// 添加
	@Insert("INSERT INTO u_link_group (name, sort, is_effect) VALUES (#{name}, #{sort}, #{is_effect})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_link_group(ApiU_link_group u_link_group);

	// 修改
	@Update("UPDATE u_link_group SET name = #{name}, sort = #{sort}, is_effect = #{is_effect} WHERE id = #{id}")
	public int updateU_link_group(ApiU_link_group u_link_group);

	// 删除
	@Delete("DELETE FROM u_link_group  WHERE id = #{id}")
	public int deleteU_link_group(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
